TTET3

Syntax: TTET3 ( [#ch,] [timeout%,] trapno%, bufadr)
Location: QView Tiny Toolkit

This function allows you to call the TRAP #3 operating system calls which handle screen devices.

The channel #ch (default #1) must refer to a window (con_ or scr_).

The timeout for the machine code call trap is optional, the default is -1 (indefinite timeout).

trapno% is a small positive integer that identifies the trap.

bufadr must point to a piece of memory at least 16 bytes long.  Since this toolkit provides its own buffer starting at TTV, it is recommended and safe to use this for bufadr. 

The required 16 bytes buffer is used to communicate with the processor, the registers D1, D2, A1 and A2 occupy four bytes (one longword) each within the buffer - they are copied to the processor when the trap is executed and after the trap has finished will hold any return values and be copied back into the buffer so that they may be read with the lines:   

D1=PEEK_L(bufadr)   
D2=PEEK_L(bufadr+4)   
A1=PEEK_L(bufadr+8)   
A2=PEEK_L(bufadr+12)

CROSS-REFERENCE:
See also IO_TRAP, QTRAP and MTRAP.
